var __extends =
    (this && this.__extends) ||
    (function () {
      var e = function (a, t) {
        return (e =
          Object.setPrototypeOf ||
          ({ __proto__: [] } instanceof Array &&
            function (e, a) {
              e.__proto__ = a;
            }) ||
          function (e, a) {
            for (var t in a)
              Object.prototype.hasOwnProperty.call(a, t) && (e[t] = a[t]);
          })(a, t);
      };
      return function (a, t) {
        function i() {
          this.constructor = a;
        }
        if ("function" != typeof t && null !== t)
          throw new TypeError(
            "Class extends value " + String(t) + " is not a constructor or null"
          );
        e(a, t),
          (a.prototype =
            null === t
              ? Object.create(t)
              : ((i.prototype = t.prototype), new i()));
      };
    })(),
  AXChallengeBattleView = (function (e) {
    function a() {
      var a = e.call(this) || this;
      return (
        a.btn_changeBattle_close.on(Laya.Event.CLICK, a, a.onDidClickBackPreFn),
        a.image_doujiangtai.on(Laya.Event.CLICK, a, a.onDidClickItemAction),
        a.image_yingxiongdahui.on(Laya.Event.CLICK, a, a.onDidClickItemAction),
        a.image_xiaoquanquan.on(Laya.Event.CLICK, a, a.onDidClickItemAction),
        a.image_sabidasai.on(Laya.Event.CLICK, a, a.onDidClickItemAction),
        a.image_jiaopaizigesai.on(Laya.Event.CLICK, a, a.onDidClickItemAction),
        a.image_jiaopaidazhan.on(Laya.Event.CLICK, a, a.onDidClickItemAction),
        a
      );
    }
    return (
      __extends(a, e),
      (a.showChallengeView = function () {
        return (
          null == this.challengeBattleV && (this.challengeBattleV = new a()),
          this.challengeBattleV
        );
      }),
      (a.prototype.onDidClickItemAction = function (e) {
        if ("" != e.target.name)
          if ("item_doujiangtai" == e.target.name) {
            var a = MatchArenaView.showMatchView();
            Laya.stage.addChild(a);
          } else if ("item_yingxiongdahui" == e.target.name) {
            var t = HeroConventionView.showHeroConvenView();
            Laya.stage.addChild(t);
          } else if ("item_xiaoquanquan" == e.target.name) {
            var i = FingerGuessingGameView.showFingerGuessView();
            Laya.stage.addChild(i);
          } else if ("item_sabidasai" == e.target.name) {
            var n = DropMoneyView.showDropMoneyView();
            Laya.stage.addChild(n);
          } else if ("item_jiaopaizige" == e.target.name)
            if (Global.roleLvl >= 15) {
              var o = GangWarsHomeView.showGangWarsHomeView();
              Laya.stage.addChild(o);
            } else Alert.openText("15级以上才可参加帮派资格赛");
          else if ("item_jiaopaidazhan" == e.target.name) {
            var r = HonorFieldHomeView.showHonorFieldView();
            Laya.stage.addChild(r);
          }
      }),
      (a.prototype.onDidClickBackPreFn = function () {
        this.removeSelf();
      }),
      a
    );
  })(ui.ChallengeBattle.AXChallengeBattleViewUI);
